#ifndef __ALLOCATOR_MOCK_H__
#define __ALLOCATOR_MOCK_H__

using ::testing::Return;
using ::testing::AnyNumber;

#include "IAllocator.h"
class AllocatorMock : public IAllocator {
public:
	MOCK_METHOD1(alloc, char* (int size));
	MOCK_METHOD0(free, void ());
};
class Allocator : public IAllocator{
	virtual char* alloc(int size){
		return static_cast<char*>(malloc(size));
	}
	virtual void free(){}
};
class T : public Text{
public:
	T(const char* c) : Text(c, Allocator()) { }
};

#endif